Compositional Verification of Relaxed-Memory Program Transformations

نویسندگان

  • MIKE DODDS
  • MARK BATTY
  • ALEXEY GOTSMAN
چکیده

Œis paper is about verifying program transformations on an axiomatic relaxed memory model of the kind used in C/C++ and Java. Relaxed models present particular challenges for verifying program transformations, because they generate many additional modes of interaction between code and context. For a block of code being transformed, we de€ne a denotation from its behaviour in a set of representative contexts. Our denotation summarises interactions of the code block with the rest of the program both through local and global variables, and through subtle synchronisation e‚ects due to relaxed memory. We can then prove that a transformation does not introduce new program behaviours by comparing the denotations of the code block before and a‰er. Our approach is compositional: by examining only representative contexts, transformations are veri€ed for any context. It is also fully abstract, meaning any valid transformation can be veri€ed. We cover several tricky aspects of C/C++-style memory models, including release-acquire operations, sequentially consistent fences, and non-atomics. We also de€ne a variant of our denotation that is €nite at the cost of losing full abstraction. Based on this variant, we have implemented a prototype veri€cation tool and applied it to automatically prove and disprove a range of compiler optimisations.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Verifying Local Transformations on Relaxed Memory Models

The problem of locally transforming or translating programs without altering their semantics is central to the construction of correct compilers. For concurrent shared-memory programs this task is challenging because (1) concurrent threads can observe transformations that would be undetectable in a sequential program, and (2) contemporary multiprocessors commonly use relaxed memory models that ...

متن کامل

(Relative) Safety Properties for Relaxed Approximate Programs

Researchers have recently begun to explore a new class of program transformations called approximate program transformations. These program transformations take an existing program and produce a new, relaxed approximate program that trades accuracy of its results for increased performance. In this paper, we explore how developers can use relational reasoning to verify relative properties of rel...

متن کامل

Compositional Verification of Compiler Optimisations on Relaxed Memory

A valid compiler optimisation transforms a block in a program without introducing new observable behaviours to the program as a whole. Deciding which optimisations are valid can be difficult, and depends closely on the semantic model of the programming language. Axiomatic relaxed models, such as C++11, present particular challenges for determining validity, because such models allow subtle effe...

متن کامل

On Justifying and Verifying Relaxed Detection of Conflicts in Concurrent Programs

Transactional Memory (TM) simplifies concurrent programming by providing atomic, compositional blocks within which programmers can reason sequentially. Many transactions have an access pattern where, initially, a large portion of the shared data is read, local computations is performed, and, later, a small portion of shared data is updated. Such transactions conflict frequently and result in po...

متن کامل

On Justifying and Verifying Relaxed Detection of Conflicts in Concurrent Programs

Transactional Memory (TM) simplifies concurrent programming by providing atomic, compositional blocks within which programmers can reason sequentially. Many transactions have an access pattern where, initially, a large portion of the shared data is read, local computations is performed, and, later, a small portion of shared data is updated. Such transactions conflict frequently and result in po...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2017